using System.Windows;
using System.Windows.Markup;

namespace MainView.Windows
{
    public partial class AddCurrentSegmengCycleWindow : Window, IComponentConnector
    {
        public static readonly DependencyProperty CurrentSegmentProperty = DependencyProperty.Register("CurrentSegment", typeof(string), typeof(AddCurrentSegmengCycleWindow), new UIPropertyMetadata(null));

        public static readonly DependencyProperty CurrentSegmentCycleProperty = DependencyProperty.Register("CurrentSegmentCycle", typeof(int), typeof(AddCurrentSegmengCycleWindow), new UIPropertyMetadata(0));

        public static readonly DependencyProperty AddSegmentCycleProperty = DependencyProperty.Register("AddSegmentCycle", typeof(int), typeof(AddCurrentSegmengCycleWindow), new UIPropertyMetadata(1));

        public string CurrentSegment
        {
            get
            {
                return (string)GetValue(CurrentSegmentProperty);
            }
            set
            {
                SetValue(CurrentSegmentProperty, value);
            }
        }

        public int CurrentSegmentCycle
        {
            get
            {
                return (int)GetValue(CurrentSegmentCycleProperty);
            }
            set
            {
                SetValue(CurrentSegmentCycleProperty, value);
            }
        }

        public int AddSegmentCycle
        {
            get
            {
                return (int)GetValue(AddSegmentCycleProperty);
            }
            set
            {
                SetValue(AddSegmentCycleProperty, value);
            }
        }

        public AddCurrentSegmengCycleWindow()
        {
            InitializeComponent();
        }

        private void btnOk_Click(object sender, RoutedEventArgs e)
        {
            base.DialogResult = true;
            Close();
        }

        private void btnCancel_Click(object sender, RoutedEventArgs e)
        {
            base.DialogResult = false;
            Close();
        }
    }
}
